package cn.tedu.overhaul.management.config;

import java.text.SimpleDateFormat;

public class IsDateInFormat {

    public static boolean isDateInFormat(String dateString, String targetFormat) {
        try {
            SimpleDateFormat format = new SimpleDateFormat(targetFormat);
            format.parse(dateString);
            return true;
        } catch (Exception e) {
            return false;
        }
    }
}
